package logic

import (
	"context"
	"dataservice/internal/data"
	"gitee.com/jmdvirus/jkgo/jk/jklog"

	"dataservice/internal/svc"
	"dataservice/internal/types"

	"github.com/tal-tech/go-zero/core/logx"
)

type ShiciListExLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewShiciListExLogic(ctx context.Context, svcCtx *svc.ServiceContext) ShiciListExLogic {
	return ShiciListExLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *ShiciListExLogic) ShiciListEx(req types.ShiciListRequestEx) (*types.ShiciList, error) {
	jklog.L().Infof("find list start[%d] limit [%d]", req.Start, req.Limit)

	sclist := data.GetShiciList(req.Start, req.Limit)

	return sclist, nil
}
